<?php


use Illuminate\Support\Facades\Route;

Route::namespace('admin')->group(function (){
    //需要登录并且进行鉴权
    Route::prefix('admin')->middleware('checkAdminLoginAndCheAuth')->group(function (){
        Route::any('/','HomeController@index')->name('admin.main');


        Route::any('/good','GoodsController@goods')->name('admin.goods.goods');


        Route::any('/oli_orders','OliOrdersController@oli_orders')->name('admin.oli_orders.oli_orders');


        Route::any('/users','UsersController@users')->name('admin.users.users');
        Route::any('/users_bills','BillsController@bills')->name('admin.users.bills');
        Route::any('/consumer_coupon_bills','BillsController@consumer_coupon_bills')->name('admin.users.consumer_coupon_bills');
        Route::any('/oli_bills','BillsController@oli_bills')->name('admin.users.oli_bills');
        Route::any('/recharge','UsersController@recharge')->name('admin.users.recharge');
        Route::any('/balance_zhu','UsersController@balance_zhu')->name('admin.users.balance_zhu');
        Route::any('/user_setting','UsersController@user_setting')->name('admin.users.user_setting');
        Route::any('/user_quxian','UsersController@user_quxian')->name('admin.users.user_quxian');

        Route::any('/get_child_area','UsersController@get_child_area')->name('admin.users.get_child_area');

        Route::any('banks','BankController@banks')->name('admin.banks.banks');
        Route::any('/add_banks','BankController@add')->name('admin.banks.add');
        Route::any('/edit_banks','BankController@update')->name('admin.banks.edit');

        Route::any('olis','OliController@olis')->name('admin.olis.olis');
        Route::any('olis_add','OliController@add')->name('admin.olis.add');
        Route::any('olis_edit','OliController@edit')->name('admin.olis.edit');
    });




    //不需要登录的后台接口
    Route::prefix('admin')->group(function (){
        Route::any('login','LoginController@login')->name('admin.login');//后台用户登录


        Route::any('file_up','HomeController@file_up')->name('admin.file_up');
        Route::any('file_up1','HomeController@local1')->name('admin.local1');
        Route::any('file_up2','HomeController@file_up2')->name('admin.local2');

    });
});
